#{if shoppingCart} 
#{if user?.dietInformation}
	<script>
		$(document).ready(function() {
			var userCalories = ${user?.dietInformation?.targetCalories};
			var shoppingCartCalories = ${shoppingCart?.calories};
			showNutritionDetailsImg(userCalories, shoppingCartCalories);
		});
	</script>
#{/if}

	<table class="tableshoppingcart table-bordered table-striped">
		<thead>
			<tr>
				<th>Product</th>
				<th>Qty</th>
				<th>Price</th>
				<th>Del.</th>
			</tr>
		</thead>
	
		<tbody id="tbodyShoppingCart">
			#{list items:shoppingCart.lines, as:'line'}
			<tr>
				<td>${line.product.name}</td>
				<td>${line.quantity}</td>
				<td>$${line.price.format('.00')}</td>
				<td onclick="deleteFromCart(${line.id})"><i class="icon-remove-circle delete"></i></td>
			</tr>
			#{/list}
			<tr>
				<td colspan=2><strong>Total:</strong></td>
				<td id="shoppingCartTotalValue">$${shoppingCart.price.format('0.00')}</td>
				<td></td>
			</tr>
		</tbody>
	</table>
	
	 <div class="pull-center">
		<button class="btn btn-primary" id="purchaseBtn">Purchase for
		$${shoppingCart.price.format('0.00')}</button>
	</div>
#{/if}
